<template>
  <div class="link-box" title="点击进入训练" @click="$router.push({ name: 'taskList' })" >
    <div class="title">say world good say world good say world good say world </div>
    <div v-if="status === 2" class="show-info">得分：90分</div>
    <div v-else class="show-info">进度：0/1</div>
    <el-tag v-if="status === 0" type="info">未开始</el-tag>
    <el-tag v-else-if="status === 1" type="warning">进行中</el-tag>
    <el-tag v-else type="success">已完成</el-tag>
  </div>
</template>

<script>
export default {
  name: 'linkBox',
  props: {
    status: {
      default: () => 0, // 0:未开始 ，1: 进行中; 2: 已完成
      type: Number
    },
    taskAllNum: { // 任务总数
      default: () => 0,
      type: Number
    },
    finishedTaskNum: { // 完成的任务数
      default: () => 0,
      type: Number
    },
    score: { // 得分
      default: () => 0,
      type: Number
    }
  }
}
</script>

<style scoped lang="scss">
.link-box{
  width: 95%;
  cursor: pointer;
  min-height: 60px;
  border-radius: 10px;
  background-color: white;
  margin-top: 20px;
  box-shadow:0px 2px 12px 0px rgba(4,0,0,0.05);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 10px;
  .title{
    width: 80%;
    height: 100%;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
  }
  .show-info{
    margin-right: 40px;
  }
}
</style>
